package com.hlk.user;

import com.hlk.pojo.bo.UpdateUserInfoBO;
import com.hlk.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @author hlk
 * @version 1.0
 * @date 2020-12-21 10:24
 */
@Api(value = "用户相关controller", tags = {"用户信息相关Controller"})
@RequestMapping("user")
public interface UserControllerApi {
    @ApiOperation(value = "获得用户基本信息")
    @PostMapping("getUserInfo")
    Result getUserInfo(@RequestParam String userId);

    @ApiOperation(value = "获得用户账户信息")
    @PostMapping("/getAccountInfo")
    Result getAccountInfo(@RequestParam String userId);

    @ApiOperation(value = "修改/完善用户信息")
    @PostMapping("/updateUserInfo")
    Result updateUserInfo(
            @RequestBody @Valid UpdateUserInfoBO updateUserInfoBO,
            BindingResult result);

    @ApiOperation(value = "根据用户的ids查询用户列表")
    @GetMapping("/queryByIds")
    Result queryByIds(@RequestParam String userIds);
}
